package com.ktjiaoyu.controller;

import com.ktjiaoyu.mapper.NewsTypeMapper;
import com.ktjiaoyu.pojo.NewsType;
import com.ktjiaoyu.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: DABINGCHNEGJIAO
 * @CreateTime: 2025-05-29
 * @Description:
 * @Version: 1.0
 */
@RestController
@RequestMapping("api/admin")
public class NewsTypeController {
    @Autowired
    private NewsTypeMapper newsTypeMapper;

    @PostMapping("newsType/list")
    public R findNewsType() {
        List<NewsType> newsType = newsTypeMapper.findNewsType();
        return R.ok(newsType);
    }
}
